/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity_bean;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Mamoune
 */
@Embeddable
public class ExperiencePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "PERSONNE_id")
    private int pERSONNEid;
    @Basic(optional = false)
    @NotNull
    @Column(name = "COMPETENCE_id")
    private int cOMPETENCEid;

    public ExperiencePK() {
    }

    public ExperiencePK(int pERSONNEid, int cOMPETENCEid) {
        this.pERSONNEid = pERSONNEid;
        this.cOMPETENCEid = cOMPETENCEid;
    }

    public int getPERSONNEid() {
        return pERSONNEid;
    }

    public void setPERSONNEid(int pERSONNEid) {
        this.pERSONNEid = pERSONNEid;
    }

    public int getCOMPETENCEid() {
        return cOMPETENCEid;
    }

    public void setCOMPETENCEid(int cOMPETENCEid) {
        this.cOMPETENCEid = cOMPETENCEid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) pERSONNEid;
        hash += (int) cOMPETENCEid;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ExperiencePK)) {
            return false;
        }
        ExperiencePK other = (ExperiencePK) object;
        if (this.pERSONNEid != other.pERSONNEid) {
            return false;
        }
        if (this.cOMPETENCEid != other.cOMPETENCEid) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity_bean.ExperiencePK[ pERSONNEid=" + pERSONNEid + ", cOMPETENCEid=" + cOMPETENCEid + " ]";
    }
    
}
